entry: Handle touch events on entry icons
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 4 Sep 2014 13:24:32 +0000 (15:24 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 4 Sep 2014 14:43:16 +0000 (16:43 +0200)
commit9629fd07e3bf34974d45c7c2d3b7f2f74aca0969
treec4c84b80e050ad5a5fcf7353ed407ce9eab987e0
parent0a9d60cdde3d12413f2cccdfa3184ef63b5ecafa
entry: Handle touch events on entry icons

Those used to work indirectly due to GtkEntry not setting GDK_TOUCH_MASK,
so pointer emulation would happen on those, but the event handlers on icons
and its icon-pressed/released signals have never been explicitly touch
aware, and this broke since the GDK_TOUCH_MASK can be set indirectly by
GtkGestures.

So make the icon event handler handle touch events, each icon can get hold
of one GdkEventSequence, reacting exclusively to it. This is still not
ported to GtkGesture due to GdkEvent exposure in these icon signals, as
users might expect GDK_2/3BUTTON_PRESS while GtkGesture ignores those.

Also, unset all icon pressed/sequence state on grab-notify, this used to
happen ad-hoc when initiating icon DnD, but that doesn't cut it for
user-defined reasons to initiate a grab (eg. popovers).

https://bugzilla.gnome.org/show_bug.cgi?id=736004
gtk/gtkentry.c